package com.yaj.myfactorysupport.controller;


import com.yaj.myfactorysupport.dto.TLightInfoAccompDto;
import com.yaj.myfactorysupport.service.TLightInfoAccompService;
import com.yaj.myfactorysupport.util.RespBean;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wei
 * @since 2022-01-03
 */
@RestController
@RequestMapping("/myfactorysupport/t-light-info-accomp")
public class TLightInfoAccompController {
    @Autowired
    private TLightInfoAccompService tLightInfoAccompService;

    @ApiOperation(value = "行灯故障登录")
    @PostMapping(value = "regTLightInfoAccomp")
    public RespBean RegTLightInfoAccomp(TLightInfoAccompDto tLightInfoAccompDto){
        return tLightInfoAccompService.RegTLightInfoAccomp(tLightInfoAccompDto);
    };

    @ApiOperation(value ="取得行灯故障一览")
    @GetMapping(value = "getTLightInfoAccompList")
    public RespBean getTLightInfoAccompList(){
        return tLightInfoAccompService.getTLightInfoAccompList();
    }

    @ApiOperation(value = "错误恢复")
    @PostMapping(value = "recoveryTLightInfoAccomp")
    public RespBean recoveryTLightInfoAccomp(BigDecimal uid,String user){
        return tLightInfoAccompService.recoveryTLightInfoAccomp(uid,user);
    }

    @ApiOperation(value = "修理产线")
    @PostMapping(value = "repairTLightInfoAccomp")
    public RespBean repairTLightInfoAccomp(BigDecimal uid,String user){
        return tLightInfoAccompService.repairTLightInfoAccomp(uid,user);
    }
}

